package com.niudong.esdemo.lucene;

import org.apache.lucene.codecs.compressing.CompressionMode;
import org.apache.lucene.codecs.compressing.Compressor;
import org.apache.lucene.codecs.compressing.Decompressor;
import org.apache.lucene.store.ByteArrayDataInput;
import org.apache.lucene.store.ByteArrayDataOutput;
import org.apache.lucene.util.BytesRef;

import java.io.IOException;

public class CompressDemo2 {
    public static void main(String[] args) throws Exception {

        String s1 = "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn\n" +
                "hadoop kafka hive hbase\n" +
                "mapreduce yarn";

        String s2 = "开始觉得发货很快就收到回复收到了开个会立刻收到回复看脸时代快疯了金黄色的考虑房价凉快圣诞节弗兰克";

        System.out.println("---------------------------------------");

        test(s1);

        System.out.println("---------------------------------------");
        test(s2);

    }

    private static void test(String s) throws IOException {

        Compressor compressor = CompressionMode.HIGH_COMPRESSION.newCompressor();
        Decompressor decompressor = CompressionMode.HIGH_COMPRESSION.newDecompressor();

        byte[] bytes = s.getBytes("UTF-8");
        System.out.println("字符串长度：" + s.length());
        System.out.println("字符串byte长度：" + bytes.length);

        byte[] outPutBytes = new byte[20140];
        ByteArrayDataOutput dataOutput = new ByteArrayDataOutput(outPutBytes);
        ByteArrayDataInput dataInput = new ByteArrayDataInput(outPutBytes);




        compressor.compress(bytes,0,bytes.length,dataOutput);

        System.out.println("压缩后：：" + dataOutput.getPosition());
        //System.out.println(Bytes.asList(outPutBytes));


        BytesRef ref = new BytesRef(20140);
        //decompressor.decompress(dataInput,bytes.length,0,dataOutput.getPosition(),ref);
        decompressor.decompress(dataInput,bytes.length,0,dataOutput.getPosition(),ref);
       // System.out.println(ref.utf8ToString().length());
        //System.out.println(ref.utf8ToString());
        System.out.println("解压字符串后：：" + ref.utf8ToString().length());
        System.out.println(ref.utf8ToString());
    }

}
